package com.csf.struct.decorator;

/**
 * TODO ADD DESCRIPTION
 * Date: 2018/9/6
 * Time: 16:04
 *
 * @author chenshf
 */
public class DecoratorSource implements Sourceble {

    /**
     * 持有源目标
     */
    private Source target;

    public DecoratorSource(Source target){
        this.target = target;
    }

    @Override
    public void method1() {

        System.out.println("我帮你增加功能拉");
        target.method1();
        System.out.println("开心吧");

    }
}
